﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GameFramework.Event;
using GameFramework;
using System;

namespace TowerDefence_Zombie
{
    public class ChangeCurrencyEventArgs : GameEventArgs
    {
        public static readonly int EventId = typeof(ChangeCurrencyEventArgs).GetHashCode();

        public int MoneyId
        {
            get;
            private set;
        }

        public CurrencyType CurrencyType
        {
            get;
            private set;
        }

        public long CurrencyNum
        {
            get;
            private set;
        }

        public ChangeCurrencyEventArgs()
        {
            MoneyId = 0;
            CurrencyNum = 0;
            CurrencyType = CurrencyType.None;
        }

        public override int Id
        {
            get
            {
                return EventId;
            }
        }


        public object UserData
        {
            get;
            private set;
        }

        public static ChangeCurrencyEventArgs Create(int MoneyId, CurrencyType currencyType, long currencyNum, object userData = null)
        {
            ChangeCurrencyEventArgs playerEnergyChangeEventArgs = ReferencePool.Acquire<ChangeCurrencyEventArgs>();
            playerEnergyChangeEventArgs.MoneyId = MoneyId;
            playerEnergyChangeEventArgs.CurrencyType = currencyType;
            playerEnergyChangeEventArgs.CurrencyNum = currencyNum;
            return playerEnergyChangeEventArgs;
        }

        public override void Clear()
        {
            MoneyId = 0;
            CurrencyNum = 0;
            CurrencyType = CurrencyType.None;
        }
    }
}